﻿#region

using System;
using System.Web.Mvc;

#endregion

namespace HouseHoldBudget.Framework.Mvc
{
    public abstract class MvcEntityModelBase
    {
        #region Instance Properties

        /// <summary>
        ///   Gets or sets the id.
        /// </summary>
        /// <value> The id. </value>
        public virtual Guid Id { get; set; }

        /// <summary>
        ///   Gets a value indicating whether this instance is in edit mode.
        /// </summary>
        /// <value> <c>true</c> if this instance is edit mode; otherwise, <c>false</c> . </value>
        public bool IsEditMode
        {
            get
            {
                if (Id != Guid.Empty)
                    return true;
                return false;
            }
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="MvcEntityModelBase" /> class.
        /// </summary>
        protected MvcEntityModelBase()
        {
            Id = new Guid();
        }

        #endregion
    }

    public class MvcModelBase
    {
        #region Instance Methods

        public virtual void BindModel(ControllerContext controllerContext, ModelBindingContext bindingContext)
        {
        }

        #endregion
    }
}